<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       // var arr2 = [2,1,3]; 打印 最大值 最小值 和中间的值；
       function fn(a,b,c){
        var min = a;
       if(b<min){
        min = b;
       }
       if(c<min){
        min = c;
       }
       var max = a;
       if(b>max){
        max = b;
       }
       
       if(c>max){
        max = c;
       }
       console.log(min+"是最小");
       console.log(max+"是最大");
       
       var middle;
       if(min<a && a<max){
        middle = a;
       }
       if(min<b && b<max){
        middle = b;
       }
       if(min<c && c<max){
        middle = c;
       }
       console.log(middle+"是中间")

       }
       
fn(9,18,7);

// console.log( Math.min(2,4,9));
// console.log( Math.middle(2,4,9));






    </script>
</body>
</html>